﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<style>
    i.fa-toggle-on {
        color: #1ABC9C;
        font-size: 13pt;
        vertical-align: middle;
        margin-top: -1px;
        margin-left: -3px;
        height: 15px;
    }
</style>
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        $.ajax({
            url: "/WorkFlow/WFCategory/GetFormJson",
            data: { keyValue: keyValue },
            dataType: "json",
            async: false,
            success: function (data) {
                $("#parentName").text(data.parentName);
                $("#sortIdx").text(data.sortIdx);
                $("#code").text(data.code);
                $("#name").text(data.name);
                $("#remark").text(data.remark);
                $("#createUser").text(data.createUser);
                $("#createTime").text(data.createTime);
                $("#state").html("<i class=\"fa fa-toggle-" + (data.deleteMark ? "off":"on") + "\"></i>");
            }
        });
    });
</script>
<form id="form1">
    <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
        <div style="padding-top: 20px; margin-right: 30px;">
            <table class="form">
                <tr>
                    <th class="formTitle">父级</th>
                    <td class="formValue">
                        <label id="parentName"></label>
                    </td>
                    <th class="formTitle">排序</th>
                    <td class="formValue">
                        <label id="sortIdx"></label>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">编码</th>
                    <td class="formValue">
                        <label id="code"></label>
                    </td>
                    <th class="formTitle">名称</th>
                    <td class="formValue">
                        <label id="name"></label>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">创建人员</th>
                    <td class="formValue">
                        <label id="createUser"></label>
                    </td>
                    <th class="formTitle">创建时间</th>
                    <td class="formValue">
                        <label id="createTime"></label>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">备注</th>
                    <td class="formValue" colspan="3">
                        <label id="remark"></label>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">有效</th>
                    <td class="formValue">
                        <label id="state"></label>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</form>
